#ifndef STATE_TUTORIAL_H
#define STATE_TUTORIAL_H

#include "state_base.h"
#include "vn_text_output.h"
#include "bn_sprite_items_arrow_col.h"
#include "bn_sprite_items_arrow_row.h"
#include "bn_sprite_items_bar_horz.h"
#include "bn_sprite_items_good.h"
#include "bn_sprite_items_not_good.h"


class TutorialMode : public GameState
{
private:
    bn::regular_bg_ptr bg_pattern;
    bn::optional<bn::regular_bg_ptr> bg_foreground;
    bn::regular_bg_map_ptr map;

    bn::optional<bn::sprite_ptr> sprite;

    int script_ptr,symbol_ptr,line_ptr;

    const int map_redraw_start_x = 8;
    const int map_redraw_start_y = 9;
    const int map_redraw_width = 20;
    const int map_redraw_height = 16;

    const int text_redraw_start_y = 20;

    text* _text;

    bool bg_redrawn, sprites_redrawn;

    void initScreen();
    int drawText();

    void clearBG();

    void BasicRulesExample(bool,bool);
    void SeparatedSquaresExample(bool);
    void SeparatedSquaresOrderExample(bool, bool);

    void StrategyTipOne_Full();
    void StrategyTipOne_Empty();
    void StrategyTipOne_Group();
    void StrategyTipOne_Advanced();

    void StrategyTipTwo_Single(int);
    void StrategyTipTwo_Multiple(int);

    void StrategyTipThree();

public:
    TutorialMode();
    TutorialMode(bn::sprite_text_generator*);
    TutorialMode(text*);

    int updateState();

    void toggleStateVisibility(bool) override;
    void toggleFadeEffect() override;

    ~TutorialMode();
};

#endif // STATE_TUTORIAL_H
